I am not able to add share extension to my app, as it in not getting installed with MIInstaller or MIContainer when i check the logs.
I tried going to a very old commit of my main app(like an year ago- lets say it containing app 2), and share extension was adding up fine.
When i checked the iOS console log
[MIInstaller performInstallationWithError:]: Install Successful; Staging: 0.00s; Waiting: 0.00s; Preflight/Patch: 0.01s, Verifying: 0.00s; Overall: 0.22s
and
[MIContainer makeContainerLiveReplacingContainer:reason:withError:]
Both are working for containing app, but it never runs for extension.
When working with containing app2(old commit app), adding extension
I get
[MIContainer makeContainerLiveReplacingContainer:reason:withError:]: Made container live for com.sentieo.****.sharetestClipper at /Users/abhijeet/Library/Developer/CoreSimulator/Devices/67BB0468-878B-4216-B092-2B16F5292939/data/Containers/Data/PluginKitPlugin/19C4F695-2B90-49B3-94AA-5AD09C565BA1
this works fine,
Have been debugging this for 3 days now, anything i need to check.
also i did posted another question (Share Extension Not showing up on iPad existing project).
UPDATE
Figured out the root cause of the issue.
I am using ckeditor inside my project, which includes plugins folder reference. This "Plugins" folder is same one which needs to be there for installing extesnion.
myap.app/plugins/
Removing plugin folder reference (blue color), i get my extension shows up.
Is there a way to rename this "plugins" folder or is there a way to install extension in seperate plugins folder ?
For anyone looking for answers,
I just shifted the ckeditor "plugins and other ckeditor folder/file" into a different folder reference "ckeditor" to make way for plugins to install appex files.
And for ckeditor to still use the folder reference relative, give them the directory path.
NSString *dataDir = [[[NSBundle mainBundle] bundlePath]
stringByAppendingPathComponent:@"ckeditor"];
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"index" ofType:@"html" inDirectory:@"ckeditor"];
NSData *htmlData = [NSData dataWithContentsOfFile:filePath];
NSString *htmlString = [[NSString alloc] initWithData:htmlData encoding:NSUTF8StringEncoding];
NSString *bundlePath = [NSString stringWithFormat:@"%@/",dataDir];
[_webView loadHTMLString:htmlString baseURL:[NSURL URLWithString:bundlePath]];