Stéphane de Luca
Stéphane de Luca

Reputation: 13611

Flutter: issue when building the app for iOS on my Mac

It's kind of weird the building process —while copying the flutter blue lib— makes reference to an inexistant folder:

error: open /development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_blue_plus-1.1.2/ios/gen/Flutterblueplus.pbobjc.h: No such file or directory (in target 'flutter_blue_plus' from project 'Pods')

Actually the copy step is as follows:

PBXCp /Users/stephanedeluca/development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_blue_plus-1.1.2/ios/gen/Flutterblueplus.pbobjc.h /development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_blue_plus-1.1.2/ios/gen/Flutterblueplus.pbobjc.h (in target 'flutter_blue_plus' from project 'Pods')
    cd /Users/stephanedeluca/Documents/dsei/XXXXX/ios/Pods
    builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks /Users/stephanedeluca/development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_blue_plus-1.1.2/ios/gen/Flutterblueplus.pbobjc.h /development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_blue_plus-1.1.2/ios/gen

And what I see is that the file is referred once with the right folder prefix (aka ~/development) but after straight from the /development folder omitting the user location prefix.

How can I fix that?

Upvotes: 2

Views: 449

Answers (2)

CuteLizard420
CuteLizard420

Reputation: 72

Open your IOS folder in your Flutter project in XCode. Then go to Pods. In the "TARGETS" section, select:

flutter_blue_plus > Build Phases > Copy../../../Developer/flutter/.pub-cache

In the subpath, add your Mac username before /Developer

For example myusername/Developer/flutter/...enter image description here

Upvotes: 1

Stéphane de Luca
Stéphane de Luca

Reputation: 13611

Finally I found that all y'all need to do is a:

$ flutter upgrade $ flutter pub get

Upvotes: 0

Related Questions