Open chris-sark opened 1 month ago
@MaxAst Still running into this issue and I'm totally unsure why. When I run it through the xcode debugger by attaching a debugger to the process, these are the logs I get:
🟢 Registering module 'ExpoAsset'
🟢 Registering module 'ExpoVideoView'
🟢 Registering module 'EASClient'
🟢 Registering module 'ExponentFileSystem'
🟢 Registering module 'ExpoHaptics'
🟢 Registering module 'ExpoKeepAwake'
🟢 Registering module 'ExpoLinearGradient'
🟢 Registering module 'ExpoHead'
🟢 Registering module 'ExpoShareExtension'
🟢 Registering module 'ExpoDevLauncherInternal'
🟢 Registering module 'ExpoDevLauncherAuth'
🟢 Registering module 'RNCSafeAreaProvider'
🟢 Registering module 'ExpoDevMenu'
🟢 Registering module 'ExpoDevMenuInternal'
🟢 Registering module 'DevMenuPreferences'
🟢 Registering module 'RNCSafeAreaProvider'
AddInstanceForFactory: No factory registered for id <CFUUID 0x11051aca0> F8BB1C28-BAE8-11D6-9C31-00039315CD46
-[_EXSinkLoadOperator loadItemForTypeIdentifier:completionHandler:expectedValueClass:options:] nil expectedValueClass allowing {(
_EXItemProviderSandboxedResource,
NSData,
NSNumber,
NSDictionary,
NSError,
NSArray,
NSUUID,
NSString,
NSDate,
CKShare,
UIImage,
DDRemoteActionContext,
NSValue,
NSURL
)}
Running application shareExtension ({
initialProps = {
url = "https://www.apple.com/";
};
rootTag = 1;
})
Unbalanced calls start/end for tag 19
And then the process just aborts. Would love some more insight here if you have any, thanks!
Attached is an img with data re memory useage, etc.
@MaxAst As a third follow up - I tried to get the share extension working with a minimum reproducible example, but I'm still running into the same issue. Here is the repo for the example - all the files are there. I essentially just ran npx create-expo-app@latest
and then followed the install instructions for expo share extension. To run, npm install
-> npx expo prebuild -p ios --clean
-> npx expo run:ios
should do the trick.
Please let me know if you can help out here, thanks!
@MaxAst Okay! I finally figured out what was causing the issue: it's because I'm using the new react native architecture through expo's expo-build-properties. In my plugins, I have the following:
[
"expo-build-properties",
{
"ios": {
"newArchEnabled": true
}
}
],
and when I remove it, there's no crash!
Going to update this card to detail 'support new architecture'.
Thx again for the lib, going to be using this all the time
ohh interesting, thanks for reporting @chris-sark! I'll make sure that the new architecture is supported going forward. Sorry for getting back to you late, I haven't had much time for expo-share-extension over the past month
No worries! I'll likely be around a lot posting bugs / requests, looking forward to collaborating!
While I have you - what's the best way to share data between the extension and the main app via async storage? I need to make an api call in the share extension which requires a token stored in async storage under the main app.
Thanks again!
For that I use react-native-mmkv
@MaxAst Hi, may I ask how you are using mmkv without the new arch enabled? mmkv supports app groups from the version 3 and up which requires the new arch. I had a similar use case so I upgraded to new arch, unfortunately now this package is crashing...
@AkbarKhamid I ended up using react-native-shared-group-preferences
, although I imagine you could just download an older version of mmkv (v2.x.x) as that does not require new arch
I do not think app groups are supported by mmkv in versions below 3.x (per the release notes).
I will try to setup react-native-shared-group-preferences
then.
Hello,
I am having a very similar issue to this one. The extension is hanging in the exact same way as the video in that issue, and I am unsure why. I have excluded expo-updates as well as most other expo packages I don't need, and for some reason I'm still getting crashes.
related files:
app.json
babel.config.js
package.json
All other files are the same as in the previously mentioned issue. the only other difference is that I am using eas build instead of prebuild. I did try running prebuild to see if there was maybe a problem with using eas build, but it still crashes. Let me know what I might be missing. Thanks!