• Stars
    star
    587
  • Rank 73,485 (Top 2 %)
  • Language
    C#
  • License
    MIT License
  • Created over 11 years ago
  • Updated almost 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Add files and frameworks to your Xcode project after it is generated by Unity 3D.

#XUPorter

Overview

XUPorter can help you to add files and frameworks to your Xcode 4 project after it is generated by Unity 3D automatically and dramatically. Lot of changes from XCodeEditor-for-Unity.

中文版的说明请看这里

Installation

Add all files of the repo to your Unity project's Editor Folder: {$ProjectFolder}/Assets/Editor/XUPorter or you can download this unity package and import to your project.

Some demos are contained in /Mods folder, they are just a tutorial to help you getting start. Please feel free to delete or substitute all files in that folder as soon as you know how to use XUPorter. A simplified MiniJSON is now used in XUPorter, but I put it into a namespace, so there is no worry of conflicting, even if you are already using a same JSON wrapper.

XUPorter require Unity 3.5 or higher and Xcode 4 to work properly. I have tested for Xcode 5 DP and it can work well now too.

Usage

After the Unity's building phase, OnPostProcessBuild in XCodePostProcess.cs will be called and Xcode project file will be modified. All .projmods (which is in JSON) will be treated as Xcode patch setting files (In the demos, all .projmods files are in /Mods folder). XUPorter will find and read all projmods files in /Assets and modify Xcode project file as settings.

In these setting files, specify the fields using a json pattern.

  • group:The group name in Xcode to which files and folders will added by this projmods file
  • libs:The name of libs should be added in Xcode Build Phases, libz.dylib for example. If you want to import a .a lib to Xcode, add it as a file(in "files")
  • frameworks:The name of framework should be added in Xcode Build Phases, Security.framework for example. If you want to add a third party framework, add it using a relative path to files section instead of here.
  • headerpaths:Header Search Paths in Build Setting of Xcode
  • files:Files which should be added
  • folders:Folders which should be added. All file and folders(recursively) will be added
  • excludes:Regular expression pattern. Matched files will not be added.
  • compiler_flags: Compiler flags which should be added, e.g. "-Wno-vexing-parse"
  • linker_flags: Linker flags which should be added, e.g. "-ObjC"
  • embed_binaries: Optional fields, support XCode 6+ Embed Framework feature. Notice: The frameworks must added already in frameworks or files fields.
  • plist: edit the Info.plist file, only the urltype is supported currently. in url type settings, name and schemes are required, while role is optional and is Editor by default.

Use : for folders and files to add compiler flags to those files. For example: path/to/my/folder:-fobjc-arc or path/to/my/file.m:-fobjc-arc. You can add multiple compiler flags by using , to seperate them, too.

One example, the following file will add all files in /iOS/KKKeychain to the Xcode group KKKeychain and add the Security.framework to Xcode project.

{
    "group": "KKKeychain",
    "libs": [],
    "frameworks": ["Security.framework"],
    "headerpaths": [],
    "files":   [],
    "folders": ["iOS/KKKeychain/"],    
    "excludes": ["^.*.meta$", "^.*.mdown$", "^.*.pdf$"],
    "compiler_flags": [],
    "linker_flags": [],
    "embed_binaries": [],
    "plist": {
        "urltype" : [
            {
                "role": "Editor",
                "name" : "wechat",
                "schemes":["wxyz123456789"]
            },
            {
                "name" : "twitter",
                "schemes":["www1234566"]
            }
        ],
    },
}

Contributor

Thanks for all contributors of this project. Especially @pronebird and @MatthewMaker's great effort!

LICENSE

This code is distributed under the terms and conditions of the MIT license.

Copyright (c) 2012 Wei Wang @onevcat

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

More Repositories

1

Kingfisher

A lightweight, pure-Swift library for downloading and caching images from the web.
Swift
22,692
star
2

VVDocumenter-Xcode

Xcode plug-in which helps you write documentation comment easier, for both Objective-C and Swift.
Objective-C
8,329
star
3

FengNiao

A command line tool for cleaning unused resources in Xcode.
Swift
3,325
star
4

APNGKit

High performance and delightful way to play with APNG format in iOS.
Swift
2,174
star
5

Rainbow

Delightful console output for Swift developers.
Swift
1,807
star
6

Hedwig

Send email to any SMTP server like a boss, in Swift and cross-platform
Swift
1,114
star
7

VVBlurPresentation

A simple way to present a view controller with keeping the blurred previous one.
Objective-C
894
star
8

RandomColorSwift

An attractive color generator for Swift. Ported from randomColor.js.
Swift
628
star
9

VVSpringCollectionViewFlowLayout

A spring-like collection view layout. The same effect like iOS7's Message.app
Objective-C
576
star
10

vno-jekyll

Another ported theme for Jekyll
SCSS
540
star
11

vno

Vno, just another ghost theme
CSS
518
star
12

Easy-Cal-Swift

Overload +-*/ operator for Swift, make it easier to use (and not so strict)
Swift
273
star
13

OneV-s-Den

Blog
SCSS
211
star
14

VVImageTint

UIImage category for image tint. For my blog post http://onevcat.com/2013/04/using-blending-in-ios/
Objective-C
193
star
15

VCTransitionDemo

A simple demo indicates how to make a custom view controller transition in iOS 7
Objective-C
189
star
16

UniWebView-Docs

Documentation of UniWebView Project
JavaScript
187
star
17

UserNotificationDemo

Demo project to show how to use UserNotifications framework in iOS 10
Swift
151
star
18

iOSWeekly

iOS Weekly issue for InfoQ CN
134
star
19

ToDoDemo

State-based View Controller demo
Swift
125
star
20

DebuggableContext

Provides an easy to use action sheet for debugging purpose when shaking your iOS device.
Swift
97
star
21

ObservationBP

Proof of concept for back-porting Observation framework to earlier iOS versions
Swift
92
star
22

resume

JavaScript
87
star
23

ComponentNetworking

Swift
84
star
24

swift-ui-book-issue

76
star
25

AddressParser

Email address parser.
Swift
69
star
26

Delegate

A meta library to provide a better `Delegate` pattern.
Swift
68
star
27

SpriteKitSimpleGame

A demo for starting using SpriteKit. Port famous Cocos2DSimpleGame to SpriteKit.
Objective-C
60
star
28

WatchWeather

Swift
47
star
29

MimeType

Get MIME type string from the extension of a file name
Swift
43
star
30

TimerExtensionDemo

A demo to show how to write a today extension.
Swift
41
star
31

ClockFaceView

A demo project for my blog post
Swift
31
star
32

UITestDemo

UITestDemo
Swift
21
star
33

VVStack

Just a TDD demo with XCTest and Kiwi
Objective-C
20
star
34

Noti

Swift
19
star
35

JekyllScroll

JekyllScroll is a theme for Jekyll.
CSS
19
star
36

DispatchMemoryLeakDemo

A demo that reproduce memory leak in iOS 9.2
Swift
19
star
37

VVBorderTimer

An easy border timer with configurable time, corner radius, line width and colors.
Objective-C
17
star
38

Notes

My Notes: http://notes.onevcat.com
17
star
39

lgtm-images

LGTM images collection
Swift
16
star
40

UniWebView-Deprecated

A universal webview plugin for Unity3D. Work with iOS, Android and Mac, using javascript to interact with Unity3D.
Objective-C
14
star
41

UnpauseMe

Script for Unity3D, unpause Unity3D animations or particles when set Time.timeScale = 0.
C#
14
star
42

PhotoData_Kiwi

Use Kiwi to replace objc.io's first issue. Just a demo for Kiwi and my post.
Objective-C
13
star
43

Swift-CI

Swift CI script. Stolen from vapor.
Shell
13
star
44

CounterDemo

A demo app for studying of TCA
Swift
12
star
45

check-lfs

A command-line tool to check binary file committed to a repo.
Swift
11
star
46

Kingfisher-Crash

Crash sample of Kingfisher SwiftUI with SPM on Xcode 11.2 beta
Swift
10
star
47

NeuralNetworkLearning

Swift
9
star
48

TexasPoker

A client of Texas Poker
Objective-C
9
star
49

XcodeScheme

9
star
50

YYTextSample

Sample project for a layout issue in iOS 10
Swift
9
star
51

pokemaster-images

Images for PokeMaster
9
star
52

KeyboardScrollingIssue

Swift
7
star
53

apple-versions

Astro
7
star
54

VVPluginDemo

A demo for how to make a simple Xcode 4 plug-in.
Objective-C
7
star
55

LineSDK-Integration

Integration Test Cases for LINE SDK Swift
Ruby
7
star
56

onevcat

6
star
57

VVPerlBBS

BBS with Perl. Powered by OneV's Den.
Perl
5
star
58

submail-provider

Submail email provider for Vapor
Swift
4
star
59

MwfTableViewController

Extension to UITableViewController in attempt to provide additional features that are reusable in most scenarios.
Objective-C
4
star
60

Flower-Data-Set

Python
4
star
61

GitHubActionPlayground

4
star
62

elm-2048

Practice my elm understanding
Elm
3
star
63

ChatBot

JavaScript
3
star
64

Math.swift

Math
Swift
3
star
65

onevcat.github.com

It's a user page
3
star
66

beginning-elm

JavaScript
3
star
67

LandscapeViewControllerDemo

Just a demo
Objective-C
3
star
68

LearningPerl

It's a repo for Perl learning to get prepared for future working in Kayac.
Objective-C
3
star
69

JSPatch

JSPatch bridge Objective-C and JavaScript using the Objective-C runtime. You can call any Objective-C class and method in JavaScript by just including a small engine.
Objective-C
3
star
70

advent2021

For fun
Swift
2
star
71

qixia.wang

2
star
72

GoogleInteractiveMediaAds-Carthage

2
star
73

LazyContainerBug

State of cells in "lazy" container is lost, if the cell is embedded in a stack
Swift
2
star
74

JBAlertView

JBAlertView is the new AlertView for showing different alerts type (default, connection, error, ...)
Objective-C
2
star
75

objc-image-packer

Book build image for ObjCCN
HCL
2
star
76

cool-lang

COOL Lang
Java
2
star
77

github-battle

Typescript version of GitHub Battle
TypeScript
2
star
78

KF-issue-1931

Swift
1
star
79

VVAlertBanner

A alert banner view which could queue the alert and shou them each by each.
Objective-C
1
star
80

Kingfisher-TestImages

Test images for Swift image downloading framework - Kingfisher.
1
star
81

SPMConfigDemo

Swift
1
star