NativeScript / nativescript-cli

Command-line interface for building NativeScript apps
https://www.npmjs.com/package/nativescript
Apache License 2.0
1.03k stars 195 forks source link

Building app on NativeScript #2076

Closed vchittar closed 8 years ago

vchittar commented 8 years ago

So, I am trying to build my app on XCode and I keep getting this error. How do I remedy this error?

ld: framework not found FLAnimatedImage clang: error: linker command failed with exit code 1 (use -v to see invocation)

dennistang commented 8 years ago

Are you using a plugin in your project? Sounds like it may be similar to https://github.com/NativeScript/nativescript-cli/issues/1649

NickIliev commented 8 years ago

Hey @vchittar

Can you provide some more info on your environment - versions of iOS, version of XCode, version of NativeScript. Also, are you using a specific plugin that requires the FLAnimatedImage!?

vchittar commented 8 years ago

Yeah sure. I am using iOS 7, XCode 8, and my nativescript version is 2.3.0. I think the Nativescript version of NYTPhotoviewer uses it and I have removed the pod for it too but I still continue to have this error.

NickIliev commented 8 years ago

Hey @vchittar

I saw that you are aware of the fix suggested in this thread.

Try to modify your build.xcconfig file in your _app/AppResources/iOS/

vchittar commented 8 years ago

@NickIliev What do I add to it? Currently all I have in it is:

// You can add custom settings here
// for example you can uncomment the following line to force distribution code signing
// CODE_SIGN_IDENTITY = iPhone Distribution 
// ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
// ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = Brand Assets;
NickIliev commented 8 years ago

@vchittar To try the fix to the same file with not comment slashes add

EMBEDDED_CONTENT_CONTAINS_SWIFT = YES

Save the project, remove the platforms folder and rebuiild the project.

vchittar commented 8 years ago

I did and now I get this error that tells me that my info.plist file is missing from the /platforms/ios folder. And if I may ask what does you mean by removing the project?

NickIliev commented 8 years ago

@vchittar my bad - I meant rebuild the project! (e.g. tns run ios)

vchittar commented 8 years ago

I get an error that says "Cannot read property 'id' of undefined" and I did do the whole removing and adding the project.

tzraikov commented 8 years ago

@vchittar I was able to reproduce the issue using the demo project of NYTPhotoviewer. It was created with an old version of NativeScript and needs to be updated. You can address the issue by following those steps:

  1. create a new project: tns create my-test-project
  2. cd my-test-project
  3. npm install nativescript-photoviewer
  4. tns run ios

You can fix the old project by removing the lib, and platforms folders and removing any reference to nativescript-photoviewer from your package.json file.