PODS_ROOT and other pods env variables not set when compiling Ionic app

六眼飞鱼酱① 提交于 2019-12-04 07:59:54

I've spent a long time trying to work this out and got nowhere. The app was built using Ionic 2, so the actual source code is stored elsewhere and built into a native XCode application.

Because of this I decided to delete the entire XCode directory. .xcodeproj, .xcworkspace, everything. I then rebuilt from Ionic.

On the second build I saw thats the Pods directory was there and everything was as it should be. I could compile and run first time without any issue.

My assumption is that the first build failed because I didn't have Cocoapods installed, so Ionic silently failed to run the pod install command upon set up. I guess it does something a little different to a traditional setup which is why I couldn't just run pod install afterwards.

So, in short, this was fixed by removing the iOS project:

ionic cordova platform rm ios

And re-adding it:

ionic cordova platform add ios

And then building:

ionic cordova run ios --device

But make sure you already have Cocoapods installed on your system first.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!