Copy link to clipboard
Copied
Hi everyone,
I'm working on a iOS 8 Today Widget going along with an AIR app and facing a "app to widget" communication issue.
The project consists of:
pushd ../builds
unzip MyApp.ipa
cp -r Payload/MyApp.app/* "${CONFIGURATION_BUILD_DIR}/${CONTENTS_FOLDER_PATH}/"
rm -r Payload
popd
When running the app from XCode on the device:
But when exporting an .ipa (with Product > Archive > Export), then installing it manually (via iTunes):
I only get the following warning when doing "Archive", but couldn't figure out why nor if it's related.
warning: skipping copy phase strip, binary is code signed: /Users/[...]/UninstalledProducts/TodayExtension.appex/TodayExtension
Would anyone have already experienced that issue?
Any suggestion or idea are more than welcome.
Florian
Copy link to clipboard
Copied
Wow I'm very interested in helping out here as we're facing a similar request from one of our clients.
Can you tell me how you got the app extension to merge with your AIR application? Everything I've tried so far has failed. Is the MyApp.ipa generated from your AIR application?
Copy link to clipboard
Copied
Hi Michael,
The rough idea is to merge 2 ipa:
pushd ../builds // indeed, change that path according to your App.ipa location
unzip App.ipa
cp -r Payload/App.app/* "${CONFIGURATION_BUILD_DIR}/${CONTENTS_FOLDER_PATH}/"
rm -r Payload
pushd "${CONFIGURATION_BUILD_DIR}/${CONTENTS_FOLDER_PATH}/"
rm CodeResources
ln -s _CodeSignature/CodeResources CodeResources
popd
self.data = [[NSUserDefaults alloc] initWithSuiteName:"group.domainName.appName"];
[self.data synchronize];
[data setObject:@"your_value" forKey:@"your_prop"];
var userDefaults = NSUserDefaults(suiteName: "group.domainName.appName")
userDefaults?.synchronize()
var prop = userDefaults?.stringForKey("your_prop")
Every time you open the Today Widget panel on your phone, it will get the data object that's been set by the ANE, and refreshes your UI.
By the way, our above issue was just a typo in our app group id. Our widget now works properly.
I'm gonna see with my company if we can share our UserDefaults.ANE and I'll let you guys know.
Best,
Florian