bndkt / react-native-app-clip

Easily add an App Clip for iOS apps built with React Native
https://bndkt.com/blog/2022/react-native-app-clip
499 stars 24 forks source link

Doens't create the target for App Clip #9

Closed Fannolo closed 1 year ago

Fannolo commented 1 year ago

Hello I'm trying to add the app clip feature into my project with expo SDK 47 and Xcode 14, but apparently the package doesn't create the target for app clip and whenever we run the command expo run:ios --scheme my-appClip gives me this error

This command is being executed with the global Expo CLI. Learn more: https://blog.expo.dev/the-new-expo-cli-f4250d8e3421
To use the local CLI instead (recommended in SDK 46 and higher), run:
› npx expo run:ios

› Planning build

› 0 error(s), and 0 warning(s)

Failed to build iOS project. "xcodebuild" exited with error code 65.
To view more error logs, try building the app with Xcode directly, by opening /Users/lino/dev/my-app/ios/my-app.xcworkspace.

Command line invocation:
    /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace /Users/lino/dev/my-app/ios/my-app.xcworkspace -configuration Debug -scheme my-appClip -destination id=15EF629E-6545-4856-9587-B61672ACD4AF

User defaults from command line:
    IDEPackageSupportUseBuiltinSCM = YES

2023-01-17 22:52:20.926 xcodebuild[24025:34562318] Writing error result bundle to /var/folders/ns/kkq_kqwj6cz9_d1q7y6tckfm0000gp/T/ResultBundle_2023-17-01_22-52-0020.xcresult
xcodebuild: error: The workspace named "my-app" does not contain a scheme named "my-appClip". The "-list" option can be used to find the names of the schemes in the workspace.
Build logs written to /Users/lino/dev/my-app/.expo/xcodebuild.log
tabrindle commented 1 year ago

To the contrary, I've actually found that it will add the target several times and have many duplicates, though this is after running expo prebuild -p ios so perhaps this is the thing you're missing.

bndkt commented 1 year ago

@tabrindle thanks for reporting this! I have indeed always tested with expo prebuild -p ios --clean, which removes the ios folder before rebuilding. I've now adapted the Podfile modification in a way that doesn't apply the modifications multiple times. GitHub Actions seems to be down right now so I can't release the fix just now but will do so as soon as possible.

tabrindle commented 1 year ago

Oh excellent thanks!

bndkt commented 1 year ago

Fixed with release 0.1.2