How to add js file to my xcode project?

前端 未结 3 1114
一个人的身影
一个人的身影 2020-12-08 04:38

I add some js and css files in my xcode left project tree. but when I build this project , I got the warning : no rule to process file \'$(PROJECT_DIR)/js/builder.js\' of ty

3条回答
  •  囚心锁ツ
    2020-12-08 05:00

    I got the same problem and I could solve this problem with simple technique in Xcode5. when you add/drag your HTML files into Xcode bundle you need add them by grouping as 2 types

    1.assets

    2.index.html

    you need to add these two files only.

    assets folder contains all HTML files like images,.js, content,css. All HTML files should be
    included in assets folder. what I mean is you need to group all HTML files in assets folder as a single folder.

    Then you drag that particular folder which contains ASSETS and INDEX.HTML files into Xcode bundle.

    Then do some changes in your controller declaration and implementation sections. That's it you can run your application in simulator now.If any one have not understood my answer please let me know I will add clear information with screen shots.

    I hope it will help some one..Thank you!

    If anyone have any doubts still let me know i'll explain step by step

提交回复
热议问题